#ifndef PPVDEMO_H
#define PPVDEMO_H

typedef PN_RESULT (PNEXPORT_PTR FPCREATEINSTANCE) (IUnknown** /*OUT*/ ppIUnknown);

#define FORMVALUE_GRANTACCESS		"grantaccess"
#define FORMVALUE_INSERTUSER		"insertuser"
#define FORMNAME_COMMAND			"command"
#define FORMNAME_USERID				"userid"
#define FORMNAME_PASSWORD			"password"
#define FORMNAME_URL				"url"
#define FORMNAME_URLTYPE			"urltype"
#define FORMNAME_PERMISSIONTYPE		"permissiontype"
#define FORMNAME_PERMISSIONLENGTH	"permissionlength"

#define INI_DATABASE		"Database"
#define INI_PLUGIN			"Plugin"
#define INI_SYSTEM			"System"
#define INI_CONFIG			"ppvdemo.ini"
#define INI_REALM			"Realm"
#define INI_AUTHMODE		"Authmode"
#define INI_URLS			"Urls"
#define INI_PROTOCOL		"Protocol"
#define INI_SERVER			"Server"
#define INI_PORT			"Port"
#define INI_PREFIX			"Prefix"
#define INI_FILE			"File"
#define INI_PERMISSIONS		"Permissions"
#define INI_REDIRECT		"Redirect"
#define INI_DEBUG			"Debug"

#define BUF_LENGTH			128
#define	EMPTY_STRING		""

extern IRMAPPVDatabase*  g_pPPV;

extern const char SZ_DB_USERID[50];
extern const char SZ_DB_PASSWORD[50];

void print_begin();
void print_end();
void HandleInsertUser(llist* form_input, char* szIniCfg);
void HandleGrantAccess(llist* form_input, char* szIniCfg);

#endif
